home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
sq.arc
/
SQ.DOC
next >
Wrap
Text File
|
1984-12-29
|
6KB
|
135 lines
SQUEEZE/UNSQUEEZE File compression routines. March 15, 1984
(SQPC161, USQLC10)
The squeeze/unsqueeze programs were originally deveolped for CP/M by
Richard Greenlaw. The squeeze program runs a data or program file through
a rather complicated compression routine to produce a new file which is
usually considerably smaller but can be used by the unsqueeze program to
reproduce the original file, exactly. The compression routines uses the
Huffman algorithm which represents frequently occurring characters with
fewer bits. It is not necessary to know the internal details to use
these programs.
Files found on bulletin boards and user libraries are often squeezed to
conserve file space and reduce transmission time. The exact percentage
of compression depends on the data in the file, with documentation files
ususally squeezing best.
Initial translations of the program to the IBM PC were slow, and did not
work in all cases. The current versions (SQPC161.EXE and USQLC10.COM)
were translated as closely as possible from the CP/M versions, and work
in all cases identically to the CP/M versions. USQLC10 includes an
error checking function, and will usually detect a file which was squeezed
incorrectly by an older version of sq.com.
As a result of returning to the CP/M versions, some of the PC specific
amenities (such as redirecting output to con:) were removed -- accuracy
first! A future version will put them back.
I suggest that you rename the files to SQ and USQ on your working copy, the
version suffix is just so you'll recognize the new versions as they appear.
The documentation always refers to them as SQ and USQ.
Alan Losoff
Milwaukee, Wisconsin
SQUEEZE/UNSQUEEZE Squeezing Files page 2
(SQPC161.EXE) March 15, 1984
The squeeze program squeezes a file and produces a new output file with
the 2nd letter of the file extension changed to "Q". For example
SQ THING.BAS
creates a new file called THING.BQS. The original filename is preserved as
part of the squeezed file, as is all the information needed to recreate it.
The ouput is to the default drive (in the DOS > prompt).
The output filename may not be varied, but an output drive may be specified.
Thus
SQ B: THING.BAS
creates THING.BQS on drive B. It reads the input from the default drive if
no drive is specified on the file itself. If THING.BQS already exists, it
is overwritten.
Several filenames/drives may be specified on one command line. They
are processed in order. Thus
SQ THING.BAS WHAT.ASM B: WHO.DOC A: B:WHICH.ASM
squeezes THING.BAS and WHAT.ASM from the default drive to THING.BQS and
WHAT.AQM on the same drive, then squeezes WHO.DOC from the default drive
to WHO.DQC on drive b, and finally squeezes WHICH.ASM from drive b to
WHICH.AQM on the default drive.
If no parameters are given on the command line, SQ prompts for filenames
(or drives) one at a time from the keyboard. This allows you to enter
filenames and drives after removing the disk containing SQ. Also, using
MSDOS redirection, you can enter filenames via a file or pipeline.
Restrictions:
The current version will only funtion with MSDOS 2.0 or higher, but
paths are not supported.
SQUEEZE/UNSQUEEZE Unqueezing Files page 3
(USQLC10.COM) March 15, 1984
The purpose of this program is to unsqueeze files created by SQ.COM,
restoring them to their original condition. This is a fast C version
compiled with Lattice C. It runs over 5 times as fast as the Pascal
version on most IBM boards. It also has error checking to detect files
which were improperly squeezed by an old version of SQ.
You may specify as many input files on a command line as fit, the output
filename is reconstructed from the squeezed data. Output is to the
default drive and path, but the drive may be changed by including a
drive specification with no filename. Path cannot be altered.
For example (assuming you have renamed it to USQ.COM)
USQ PROG1.CQM B:PROG2.CQM B: PROG3.DQC
will unsqueeze prog1 and prog2 (from drive b:) to the default drive and
prog3 to drive b:. The new files will have the original name, most
likely prog1.com, prog2.com and prog3.doc in this case. If you already
have a file by that name, it will be overwritten.
Two error messages are possible, UNEXPECTED EOF or CRC ERROR. In either
case some error has crept in due to copying or transmission, or
the file was not properly squeezed in the first place. The resulting file
is most likely unusable. WARNING -- older versions of USQ do not check
CRC, and may appear to unsqueeze a file correctly even if not.
Make sure you have enough disk space to handle the output file which could
be over twice the size of the input file. It is best to target your output
to a blank diskette (or a temporary directory), since the output file name
will be the name of the file originally squeezed, and may not be the name
you expect. (I clobbered a good file once, when I unsqueezed a program
named BOB.DQC and the output file was MANUAL.DOC). Future versions will
give you the option of changing the ouput name.
Restrictions:
This program should work in version 1.1 or higher of MSDOS or PCDOS.
It does not handle pathnames.
ons:
This program should work in version 1.1 or higher of MSDOS or PCDOS.
It does not handle